# 构造函数
def prime_factor(input_number):
    number = int(input_number)
    num = 2
    # 收集因子
    pri_fac = []
    # 
    while number != num:
        if number % num == 0:
            pri_fac.append(num)
            number /= num
        else:
            num += 1
    pri_fac.append(int(number))

    print(f"{input_number}的质数因子有:")
    for num1 in pri_fac:
        print(num1,end=" ")
    return print

input_number = int(input("请输入一个自然数:"))
result = prime_factor(input_number)
print(result)
    